package com.coderdream.chapter08.abstractfactory.a1;

import com.coderdream.chapter08.abstractfactory.a1.factory.Factory;
import com.coderdream.chapter08.abstractfactory.a1.factory.Page;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		if (args.length != 1) {
			System.out
					.println("Usage: java Main class.name.of.Concrete Factory");
			System.out.println("Example 1: java Main listfactory.List Factory");
			System.out
					.println("Example 2: java Main tablefactory.List Factory");
			System.exit(0);
		}

		Factory factory = Factory.getFactory(args[0]);

		Page page = factory.createYahooPage();		
		page.output();		
	}

}
